package xyz.wongs.gry.synx.thread


import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors

/**
 * @ClassName ResultCode 定义的接口状态码
 * @Description
 * @author WCNGS@QQ.COM
 * @Github <a> https://github.com/rothschil</a>
 * @date 2020/12/23 11:31
 * @Version 1.0.0
 */
ExecutorService executorService = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors())

for (i in 0..<20) {
    executorService.submit(()->{
        println("【多线程】 线程池 "+Thread.currentThread().getName()+" 序号 "+i)
    })
}